package first.demo;
import java.lang.Math;

public class threeshape {
    public static void main(String[] args) {
        double a=3.0,b=4.0,c=5.0;
        Triangle t = new Triangle(a,b,c);
        t.area();
    }

}

class Triangle{
    private double a,b,c;
    public Triangle(double a,double b, double c){
        this.a = a;
        this.b = b;
        this.c = c;
    }
    public void area(){
        double d = (a+b+c) / 2;
        System.out.println("三角形的面积:"+Math.sqrt(d*(d-a)*(d-b)*(d-c)));
    }

}
